Conversation
- Introduce `PDFConversionException` with tests to handle PDF conversion errors. - Implement `TemplatePathResolver` service for smarter file path resolution with related tests. - Enhance type annotations across `Exporter` and processor classes, aligning with modern PHP standards. - Update `Exporter` methods with consistent return types and input validation. - Fix typos (e.g., `cloneRecrusiveBlocks` → `cloneRecursiveBlocks`, `implementsMinumum` → `implementsMinimum`). - Add `symfony/process` dependency for external process interactions. - Extend tests across processors, exceptions, and services for improved coverage.
- Introduce comprehensive guides on features such as charts, tables, checkboxes, images, and batch processing. - Provide step-by-step usage instructions, including a quick start. - Highlight deprecated features and recommend migrating to export classes. - Include detailed configuration and architectural insights. - Add `mkdocs.yml` for structured documentation navigation.
- Document automatic XML escaping for text values and introduce a dedicated [XML Escaping & Security](xml-escaping.md) guide. - Update `TemplateProcessor::replace()` to handle UTF-8, prevent double-escaping, and support `allowTags` for preserving trusted inline formatting. - Disable PHPWord's internal output escaping to avoid redundancy. - Extend unit tests to validate escaping, UTF-8 preservation, null handling, and special character encoding. - Update documentation for clarity on new functionality and security best practices.
- Add strict typing with `declare(strict_types=1)` across all classes for better type enforcement. - Update property types and annotations for clarity and consistency. - Replace legacy switch-case with `match()` in exporter logic for improved readability. - Refactor `cloneRecursiveBlocks` and related methods for type safety and better parameter handling. - Introduce helper methods like `filterVariableReplacements` for better code organization. - Transition classes like `Writer`, `PDFExporter`, and `GlobalVariables` to `final` for immutability. - Apply quality-of-life improvements, including null coalescing assignments (`??=`), consistent spacing, and code deduplication.
- Add GitHub Actions CI workflow for PHPUnit tests and MkDocs builds. - Upgrade `mkdocs.yml` to use Material theme with enhanced navigation, accessibility, and styling features. - Define documentation requirements in `docs/requirements.txt`. - Include `.readthedocs.yaml` for Read the Docs configuration. - Document optional GitHub Pages deployment details in `README.md`. - Add `.gitignore` for ignoring build artifacts and vendor files. - Extend `wordexport.stub` with a `values` method for consistency. - Add default `phpunit.xml.dist` for standardized testing configuration.
…ling: - Replace `tempnam()` usage with `createUniqueTempFile()` to avoid PHP deprecations. - Simplify and modernize `tempDir()` directory creation logic. - Add recursion for directory creation with proper checks and error handling. - Update related methods for consistent usage of `createUniqueTempFile()`.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 3 potential issues.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
…ce provider: - Optimize `WordTemplateExporter` by reusing formatted data within loops for improved performance. - Remove unused methods and interfaces from `ExporterProvider`, simplifying the class structure.
|
You have used all of your free Bugbot PR reviews. To receive reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

PDFConversionExceptionwith tests to handle PDF conversion errors.TemplatePathResolverservice for smarter file path resolution with related tests.Exporterand processor classes, aligning with modern PHP standards.Exportermethods with consistent return types and input validation.cloneRecrusiveBlocks→cloneRecursiveBlocks,implementsMinumum→implementsMinimum).symfony/processdependency for external process interactions.Note
Medium Risk
Medium risk because it changes core export processing (XML escaping, block cloning helpers, temp file handling) and replaces PDF conversion execution with
symfony/process, which can affect runtime behavior across environments.Overview
Modernizes the package for newer platforms by raising requirements to PHP
8.3+/Laravel10+, upgradingphpoffice/phpword, and addingsymfony/processfor external command execution.Hardens and refactors the export pipeline: introduces
TemplatePathResolverfor consistent template path resolution, rewritesPDFExporterto run LibreOffice viaProcessand throwPDFConversionException, and tightens typing/strict-types across processors (Exporter,ExportHelper,GlobalVariables, etc.) including disabling PHPWord output escaping in favor of the package’s own escaping.Renames legacy typos like
cloneRecrusiveBlocks/arrayListRecusivewhile keeping deprecated aliases, expands PHPUnit coverage for exporters/processors/services, and adds CI + MkDocs documentation build/deploy (ReadTheDocs + optional GitHub Pages) with a shortenedREADMEpointing to the new docs.Written by Cursor Bugbot for commit bce9c2f. This will update automatically on new commits. Configure here.